{% extends "::Layout.html.twig" %}
{% block content %}
    <a href="{{ path('bxtr_signup') }}" >{% trans %}Login.Signup{% endtrans %}</a>
    {% if error %}
        {{ error.message }}
    {% endif %}
    <h1>{% trans %}Login.Title{% endtrans %}</h1>
    {{ form_start(form) }}
        <div class="form-group">
            <label class="col-sm-2 control-label" for="username">{% trans %}Ent.User.Fields.Username{% endtrans %}</label>
            <div class="col-sm-10">
                <input class="form-control" type="text" id="username" name="_username" value="{{ last_username }}" required autofocus />
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label" for="password">{% trans %}Ent.User.Fields.Password{% endtrans %}</label>
            <div class="col-sm-10">
                <input class="form-control" type="password" id="password" name="_password" required />
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-offset-2 col-sm-10">
                {{ form_widget(form.login, { label: 'Form.Submit'|trans } ) }}
            </div>
        </div>
    {{ form_end(form) }}
    {#    <form class="col-md-6 form-horizontal" role="form" action="{{ path('_security_check') }}" method="post">
        <h2 class="form-signin-heading">Connexion</h2>
        <div class="form-group">
            <label class="col-xs-6 control-label" for="username">Login</label>
            <div class="col-xs-6">
                <input class="form-control" type="text" id="username" name="_username" value="{{ last_username }}" required autofocus />
            </div>
        </div>
        <div class="form-group">
            <label class="col-xs-6 control-label" for="password">Mot de passe</label>
            <div class="col-xs-6">
                <input class="form-control" type="password" id="password" name="_password" required />
            </div>
        </div>
        <div class="col-xs-3 form-group">
            <button class="btn btn-primary btn-lg btn-block" type="submit">Connexion</button>
        </div>
    </form>
    {{ form(register_form) }}
    <form class="col-md-6 form-horizontal" role="form" action="" method="post">
        <h2 class="form-signin-heading">Inscription</h2>
        <div class="form-group">
            <label class="col-xs-6 control-label" for="username">Login</label>
            <div class="col-xs-6">
                <input class="form-control" type="text" id="username" name="_username" value="{{ last_username }}" required/>
            </div>
        </div>
        <div class="form-group">
            <label class="col-xs-6 control-label" for="password">Mot de passe</label>
            <div class="col-xs-6">
                <input class="form-control" type="password" id="password" name="_password" required />
            </div>
        </div>
        <div class="form-group">
            <label class="col-xs-6 control-label" for="password-check">Mot de passe (Vérification)</label>
            <div class="col-xs-6">
                <input class="form-control" type="password" id="password-check" name="_password_check" required />
            </div>
        </div>

        <div class="col-xs-3 form-group">
            <button class="btn btn-primary btn-lg btn-block" type="submit">Inscription</button>
        </div>
    </form>#}
{% endblock %}
